#ifndef CONSOLE_H_
#define CONSOLE_H_

#include <iostream>
#include <stdlib.h>
#include <getopt.h>
#include <string.h>

class ConcuShare;
#include "../ConcuShare.h"

#define PROMPT "CS:~$ "
#define SPACE " "
#define HELP_SHORT "-h"
#define HELP_LONG "--help"
#define VERSION_SHORT "-v"
#define VERSION_LONG "--version"
#define FILES_SHORT "-f"
#define FILES_LONG "--files"
#define SHARE_SHORT "-s"
#define SHARE_LONG "--share"
#define MY_FILES_SHORT "-myf"
#define MY_FILES_LONG "--myfiles"
#define UNSHARE_SHORT "-u"
#define UNSHARE_LONG "--unshare"
#define DOWNLOAD_SHORT "-d"
#define DOWNLOAD_LONG "--download"
#define QUIT_SHORT "-q"
#define QUIT_LONG "--quit"

class Console {

private:
	ConcuShare* concuShare;

	void show_help();
	void show_version();
	void show_files_shared();
	void share_file(std::string& operation);
	void show_my_files_shared();
	void unshare_file(std::string& operation);
	void download_file(std::string& operation);
	void quit();

	std::string get_function(std::string &operation);
	std::string get_path(std::string &operation);
	unsigned int get_my_file_num(std::string &operation);
	void show_files(const std::list<std::string>& files);
	void show_waiting();

public:
	Console(ConcuShare *concuShare);
	void show_inicio();
	void show_shell();
	void show_error(const std::string& error_message);
	void show_bye();
};

#endif /* CONSOLE_H_ */
